class newplatte extends eui.Component implements  eui.UIComponent {
	X:eui.TextInput
	Y:eui.TextInput
	color:eui.TextInput
	okbutton:eui.Button
	cancelbutton:eui.Button
	objectname:eui.TextInput
	public constructor() {
		super();
	}

	protected partAdded(partName:string,instance:any):void
	{
		super.partAdded(partName,instance);
	
	}
    private onok()
	{
		let x= Number(this.X.text)
		let y=Number(this.Y.text)
		let color=Number(this.color.text)
		CMainEditor.editor.OBJECTNAME=this.objectname.text;
		if(this.objectname.text==""||y==0||x==0)return;

	   CMainEditor.editor.newmedimplatte(x,y,color)
	}
	private oncancel()
	{
      CMainEditor.editor.cancelnewmedimplatte()
	}
	protected childrenCreated():void
	{
		    super.childrenCreated();
			this.okbutton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onok,this);
		    this.cancelbutton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.oncancel,this);
			
	}
	
}